<div class="layui-card">
    <div class="layui-card-body">
        <form class="layui-form" action=""  method="post" id="cp-form">

            <div class="layui-form-item">
                <label class="layui-form-label">模板类型<span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <select name="template_type" id="">
                        <option value="1" selected>短信通知</option>
                        <option value="2" {eq name="$data.template_type" value="2"}selected{/eq}>验证码</option>
                        <option value="3" {eq name="$data.template_type" value="3"}selected{/eq}>推广短信</option>
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">平台选择<span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <select name="service_id" >
                        {volist name='serviceList' id='v'}
                        <option value="{$v.id}" {eq name="$v.id" value="$data.service_id"}selected{/eq}>{$v.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">模板名称 <span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="template_name" required  lay-verify="required" value="{$data.template_name}" placeholder="模板名称" autocomplete="off" class="layui-input">
                    <div class="layui-form-mid layui-word-aux"></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">模板代码<span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="template_code" required  lay-verify="required" value="{$data.template_code}" placeholder="模板代码" autocomplete="off" class="layui-input">
                    <div class="layui-form-mid layui-word-aux"></div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label">模板签名<span class="request-tips">*</span></label>
                <div class="layui-input-block">
                    <input type="text" name="template_sign" required  lay-verify="required" value="{$data.template_sign}" placeholder="模板签名" autocomplete="off" class="layui-input">
                    <div class="layui-form-mid layui-word-aux"></div>
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">备注</label>
                <div class="layui-input-block">
                    <textarea name="note"  cols="30" rows="10" class="layui-textarea">{$data.note}</textarea>
                    <div class="layui-form-mid layui-word-aux"></div>
                </div>
            </div>

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <div class="layui-text">带 * 号的为必填项</div>
                    <input type="hidden" name="id" value="{$data.id}">
                    <button class="layui-btn" lay-submit lay-filter="formDemo">立即提交</button>
                    <a href="{:url('admin/sms.template/index')}" class="layui-btn layui-btn-primary" >返回</a>
                </div>
            </div>
        </form>
    </div>
</div>
